package top.honlnk.czuan.mapper.get;

import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface GetMorphemeTranslationsMapper {

    @Select("select translation_id from root_translation where root_id = #{rootId}")
    List<Integer> getRTIds(Integer rootId);

    @Select("select translation_id from prefix_translation where prefix_id = #{prefixId}")
    List<Integer> getPTIds(Integer prefixId);

    @Select("select translation_id from suffix_translation where suffix_id = #{suffixId}")
    List<Integer> getSTIds(Integer suffixId);

    @MapKey("part_id")
    List<Map<String, Object>> getPartAndTIdList(List<Integer> translationIdList);
}
